<template>
    <div id="app">
        <transition name="router-fade" mode="out-in">
            <keep-alive>
                <router-view v-if="$route.meta.keepAlive"></router-view>
            </keep-alive>
        </transition>
        <transition name="router-fade" mode="out-in">
            <router-view  v-if="keepAlive"></router-view>
            <!--<router-view  v-if="!$route.meta.keepAlive"></router-view>-->
        </transition>
    </div>
</template>
<script>
    export default {
        name : 'app',
        provide(){
            return {
                reload:this.reload
            }
        },
        data(){
            return {
                keepAlive:true,

            }
        },
        methods:{
            reload (){
                this.keepAlive = false;
                // this.$route.meta.keepAlive = false;
                this.$nextTick(function () {
                    // this.$route.meta.keepAlive = true;
                    this.keepAlive = true;
                    // console.log('4',this.$route.meta.keepAlive)
                })
            }
        }
    }
</script>


<style lang="less">
@import "./style/common";

</style>
